package com.atguigu.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2021/5/2 10:51
 */
@Configuration
public class ApplicationFig {
    @Bean
    @LoadBalanced//开启负载均衡的功能
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
